#ifndef GROUND_H_
#define GROUND_H_

#include "../actions/gravity.h"
#include "sceneObject.h"

class Ground : public SceneObject , public Solid{
	private:
		float _tileWidth;
		float _tileHeight;
		unsigned int _cols;
		unsigned int _rows;
	public:
		Ground(const Cube& cube,const Point& dir,const ObjectModelPtr& model);
		~Ground();

		void tileWidth(float tw){ _tileWidth=tw; }
		void tileHeight(float th){ _tileHeight=th; }
		float tileWidth(){ return _tileWidth; }
		float tileHeight(){ return _tileHeight; }

		void cols(unsigned int cols){_cols=cols;}
		void rows(unsigned int rows){_rows=rows;}
		unsigned int cols(){return _cols;}
		unsigned int rows(){return _rows;}

		void notifyCollision(Solid* obj);
		void notifyCollided(Solid* obj){}

		void setModelMatrix();
		void setSubModelMatrix(const std::string& name="");

		void accelerate(float accel){}

		void notifySolidPositionChange(float vel=0);

		float calculateZ(float x,float y);

		static std::string name(){
			return "ground";
		}
};

#endif /* GROUND_H_ */
